package com.tengju.bff.interfaces.openapi.vo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LetaxResponse {

    private Head head;


    private Body body;

    public static LetaxResponse error(String msg) {
        return LetaxResponse.builder()
                .head(LetaxResponse.Head.builder()
                        .rtnMsg(msg)
                        .build())
                .build();
    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Head {

        private String rtnCode = "99";

        private String rtnMsg = "请求失败";

    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Body {

        private MerchantInfo merchantInfo;

        private String bizCode;

        private String bizMsg;
    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class MerchantInfo {

        private String name;

        private String idCardNo;

        private String phoneNumber;

        private String email;

    }
}
